<?php $this->load->view("general/header");?>
<div id="view_invoice" class="page_">
    <div class="form">              
        <div class="form_header"><a href="#">Lihat Daftar Customer</a> </div>
        
            <select id="pt" name="ptName" onchange="javascript:viewCustomerPt(
                                                        '#pt', '#content_datax', '0')" >
            <option value="X" selected="selected">Tampilkan Semua</option>
            <option value="0">Tampilkan Yang Tidak Memiliki Perusahaan</option>
            <?php foreach ($perusahaan as $perusahaan1){?>
                <option value="<?php echo $perusahaan1['pt_id'];?>"><?php echo $perusahaan1['pt_name'];?></option>
            <?php }?>
            </select>
        <div class="content_data" id="content_datax">
           <div id="pager1" class="pager1">
        		<table id="background-image"> 
                    <thead> 
                        <tr> 
                            <th>Nama</th>
                            <th>Telepon</th> 
                            <th>Perusahaan</th>
                           
                            <th>Alamat</th>
                           
                        </tr> 
                    </thead> 
                    <tbody> 
                        <?php foreach ($customer as $customer1){
							$id = $customer1['customer_id'];
							?>
                        
                        <tr>
                            <td><?php echo $customer1['customer_name'];?></td> 
                            <td width="13%"><?php echo $customer1['customer_telp'];?></td> 
                            <td><?php echo $customer1['pt_name'];?></td>
                           
                            <td width="26%"><?php echo $customer1['alamat'];?> RT: <?php echo $customer1['rt'];?> RW: <?php echo $customer1['rw'];?>
                            </td>  
                           
                            <td align="center" width="13%"><a href="<?php echo site_url('customer/edit/' . $id)?>">View and Edit</a> | <a href="<?php echo site_url('customer/deleteCustomer/'. $customer1['customer_id'])?>" onclick="return confirm('Apakah Anda ingin menghapus data <?php echo $customer1['customer_name'];?>?')">Hapus</a></td>
                            
                                               
                        </tr> 
                        <?php } ?>
                       
                   </tbody> 
                    
				</table> 
                    <form>
                        <img src="<?php echo base_url();?>img/first.png" class="first" title="back to first"/>
                        <img src="<?php echo base_url();?>img/prev.png" class="prev" title="previous"/>
                        <input type="text" class="pagedisplay"/>
                        <img src="<?php echo base_url();?>img/next.png" class="next" title="next"/>
                        <img src="<?php echo base_url();?>img/last.png" class="last" title="go to last"/>
                       
                        <select class="pagesize">
                            <option selected="selected"  value="10">10</option>
                            <option value="15">15</option>
                            
                        </select>
                    
                    </form>
           </div>
        </div>
    </div>      
</div>

<?php $this->load->view("general/footer");?>